package com.sqrj.phoneorder.model;

import com.sqrj.phoneorder.util.DateDiff;
import com.sqrj.phoneorder.util.DateTimeUtil;
import lombok.ToString;

import java.util.Date;

@ToString
public class WebUserControl {
    private String code;

    private Integer flag;

    private String mc;

    private String dz;

    private String dh;

    private String fzr;

    private String zcm;

    private String khhjzh;

    private String sjrdh;

    private String sjrxm;

    private Date ycfwq;

    private String nsrsbh;

    private String sjrdz;

    private String province;

    private String city;

    private String district;

    private Integer lx;

    private String bz;

    private Date registertime;

    private Date modifytime;

    private String remaintime;

    public WebUserControl(String code, Integer flag, String mc, String dz, String dh, String fzr, String zcm, String khhjzh, String sjrdh, String sjrxm, Date ycfwq, String nsrsbh, String sjrdz, String province, String city, String district, Integer lx, String bz, Date registertime, Date modifytime) {
        this.code = code;
        this.flag = flag;
        this.mc = mc;
        this.dz = dz;
        this.dh = dh;
        this.fzr = fzr;
        this.zcm = zcm;
        this.khhjzh = khhjzh;
        this.sjrdh = sjrdh;
        this.sjrxm = sjrxm;
        this.ycfwq = ycfwq;
        this.nsrsbh = nsrsbh;
        this.sjrdz = sjrdz;
        this.province = province;
        this.city = city;
        this.district = district;
        this.lx = lx;
        this.bz = bz;
        this.registertime = registertime;
        this.modifytime = modifytime;
    }

    public WebUserControl() {
        super();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getMc() {
        return mc;
    }

    public void setMc(String mc) {
        this.mc = mc == null ? null : mc.trim();
    }

    public String getDz() {
        return dz;
    }

    public void setDz(String dz) {
        this.dz = dz == null ? null : dz.trim();
    }

    public String getDh() {
        return dh;
    }

    public void setDh(String dh) {
        this.dh = dh == null ? null : dh.trim();
    }

    public String getFzr() {
        return fzr;
    }

    public void setFzr(String fzr) {
        this.fzr = fzr == null ? null : fzr.trim();
    }

    public String getZcm() {
        return zcm;
    }

    public void setZcm(String zcm) {
        this.zcm = zcm == null ? null : zcm.trim();
    }

    public String getKhhjzh() {
        return khhjzh;
    }

    public void setKhhjzh(String khhjzh) {
        this.khhjzh = khhjzh == null ? null : khhjzh.trim();
    }

    public String getSjrdh() {
        return sjrdh;
    }

    public void setSjrdh(String sjrdh) {
        this.sjrdh = sjrdh == null ? null : sjrdh.trim();
    }

    public String getSjrxm() {
        return sjrxm;
    }

    public void setSjrxm(String sjrxm) {
        this.sjrxm = sjrxm == null ? null : sjrxm.trim();
    }

    public Date getYcfwq() {
        return ycfwq;
    }

    public void setYcfwq(Date ycfwq) {
        this.ycfwq = ycfwq;
    }

    public String getNsrsbh() {
        return nsrsbh;
    }

    public void setNsrsbh(String nsrsbh) {
        this.nsrsbh = nsrsbh == null ? null : nsrsbh.trim();
    }

    public String getSjrdz() {
        return sjrdz;
    }

    public void setSjrdz(String sjrdz) {
        this.sjrdz = sjrdz == null ? null : sjrdz.trim();
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province == null ? null : province.trim();
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city == null ? null : city.trim();
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district == null ? null : district.trim();
    }

    public Integer getLx() {
        return lx;
    }

    public void setLx(Integer lx) {
        this.lx = lx;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz == null ? null : bz.trim();
    }

    public void setRegistertime(Date registertime) {
        this.registertime = registertime;
    }

    public void setModifytime(Date modifytime) {
        this.modifytime = modifytime;
    }

    public String getRemaintime() {
        long remaintime =  DateDiff.dateDiff(this.getModifytime(), DateTimeUtil.dateToStr(new Date(),"yyyy年MM月dd日"),"yyyy年MM月dd日","d");
        return (365L - remaintime)+"";
    }

    public String getRegistertime() {
        return DateTimeUtil.dateToStr(registertime,"yyyy年MM月dd日");
    }

    public String getModifytime() {
        return DateTimeUtil.dateToStr(modifytime,"yyyy年MM月dd日");
    }

}